package com.yundingai.controller;



import com.yundingai.domain.entity.StudyRoomConfig;
import com.yundingai.service.StudyRoomConfigService;
import com.yundingai.vm.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/studyRoom")
@RestController
public class StudyRoomConfigController {
    @Autowired
    private StudyRoomConfigService studyRoomConfigService;
    @PutMapping("updateRoomConfig")
    public ResponseResult updateRoomConfig(@RequestBody StudyRoomConfig roomConfig) {
        studyRoomConfigService.updateStudyRoomConfig(roomConfig);
        return ResponseResult.okResult();

    }
@GetMapping("selectStudyRoomConfig")
    public ResponseResult selectStudyRoomConfig() {
    StudyRoomConfig roomConfig = studyRoomConfigService.selectStudyRoomConfig();
        return ResponseResult.okResult(roomConfig);
    }
}
